package com.eightywork.life.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;

import com.amap.api.maps.AMap.InfoWindowAdapter;
import com.amap.api.maps.model.Marker;
import com.eightywork.life.R;

public class MapMarkerInfoAdapter implements InfoWindowAdapter {
	private View mWindow;
	private final View mContents;
	private Context context;
	private LayoutInflater infater;
	
	public MapMarkerInfoAdapter(Context context){
		this.context = context;
		infater = (LayoutInflater) context.getSystemService(context.LAYOUT_INFLATER_SERVICE);
		mWindow = infater.inflate(R.layout.map_item,
				null);
		mContents = null;
	}

	@Override
	public View getInfoWindow(Marker marker) {
		render(marker, mWindow);
		return mWindow;
	}

	@Override
	public View getInfoContents(Marker marker) {
		render(marker, mContents);
		return mContents;
	}

	private void render(Marker marker, View view) {
	}

}
